package com.shop2cn.iapi.wxcomponent.parameter;

/**
 * @ClassName :AppNameReviewEnum
 * @Author :MrCao
 * @Description : app名称审核枚举类
 * @Date : Create in 12:30 2019/12/5
 * @Modified BY:
 */
public enum AppNameReviewEnum {
    SUCCESS(2,"失败"),
    FAIL(3,"成功");


    private int code;
    private String message;


    AppNameReviewEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }


    /**
     * 通过code获取枚举项
     *
     * @param code
     * @return
     */
    public static AppNameReviewEnum getByValue(int code) {
        for (AppNameReviewEnum appNameReviewEnum : AppNameReviewEnum.values()) {
            if (appNameReviewEnum.getCode() == code) {
                return appNameReviewEnum;
            }
        }
        return null;
    }
}
